<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			//创建正则表达式方法一
			/* var re = new RegExp("a");
			var str = "bba";
			var result = re.test(str); */
			
			//创建正则表达式方法二
			/* var re = /a/i;
			var str = "Abc";
			var result = re.test(str);
			console.log(result); */
			
			var re = /[A-z]|[0-9]@.com/
			var str = prompt();
			var result = re.test(str);
			console.log(result);
		</script>
	</head>
	<body>
	</body>
</html>
